<?php
session_start();
include '../connect.php';
include '../functions.inc';

$sql = ("SELECT user_id FROM $table_name WHERE user_name='".mysql_real_escape_string($_SESSION['logname'])."'");
$result = mysql_query($sql,$db);
$user_id = mysql_fetch_array($result);

$action = $_POST['value'];

	$sql = ("INSERT INTO wiadn VALUES('', 
		'".mysql_real_escape_string($user_id[0])."', 
		'".date("Y-m-d G-i-s")."', 
		'".mysql_real_escape_string($action)."')");

	// updateDateUser($_SESSION['logname'],$table_name);
	mysql_query($sql) or die(mysql_error());
	echo $action;

?>